package models;

import play.db.ebean.Model;

import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.List;

@Entity
public class Spurningar extends Model {

    @Id
    public int id;
    public String spurning;

    public Spurningar(int id, String spurning) {
        this.id = id;
        this.spurning = spurning;
    }

    public Spurningar( String spurning) {
        spurning = spurning;
    }

    public static Model.Finder<Integer,Spurningar> find = new Model.Finder(Integer.class, Spurningar.class);

    public static Spurningar create(String spurning) {
        Spurningar project = new Spurningar(spurning);
        project.save();
        return project;
    }
}